package com.webserver.entity;

import java.io.Serializable;

/**
 * 作者：JustOne
 * 微信：Andylau2020smile
 * 抖音：JustOne2018
 * 日期：2022/6/18 16:01
 */
public class User implements Serializable {
    //手动编写四个属性后，还需要添加：系列化版本号，无参构造，全参构造，get/set，toString
    //在这里可以带着学生回顾IO流中的对象流
    private static final long serialVersionUID = 1L;
    private String userName;
    private String passWord;
    private String nickName;
    private int age;

    public User() {
    }

    public User(String userName, String passWord, String nickName, int age) {
        this.userName = userName;
        this.passWord = passWord;
        this.nickName = nickName;
        this.age = age;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", nickName='" + nickName + '\'' +
                ", age=" + age +
                '}';
    }
}
